package com.qqt.csr.order.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

/**
 * 工单事件表
 * @author
 */
@Getter
@Setter
@Accessors(chain = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "csr_work_order_event")
@JsonIgnoreProperties(ignoreUnknown = true)
public class WorkOrderEvent implements Serializable {
    @Serial
    private static final long serialVersionUID = 6760549806721014105L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 事件类型
     */
    @TableField(value = "event_type")
    private String eventType;

    /**
     * 事件关联数据
     */
    @TableField(value = "ext")
    private String ext;

    /**
     * 工单原状态
     */
    @TableField(value = "`from`")
    private String from;

    /**
     * 工单id
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 工单新状态
     */
    @TableField(value = "`to`")
    private String to;

}